home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / Patches.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  3.8 KB  |  154 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Patches.a
  3. ;
  4. ;    Contains:    Patch Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 8
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.  
  18.     IF &TYPE('__PATCHES__') = 'UNDEFINED' THEN
  19. __PATCHES__ SET 1
  20.  
  21.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  22.     include 'MacTypes.a'
  23.     ENDIF
  24.  
  25.     IF TARGET_OS_MAC THEN
  26.  
  27. kOSTrapType                        EQU        0
  28. kToolboxTrapType                EQU        1
  29. ; typedef SignedByte                     TrapType
  30.  
  31.  
  32. OSTrap                            EQU        0                    ; old name 
  33. ToolTrap                        EQU        1                    ; old name 
  34. ;    GetTrapAddress and SetTrapAddress are obsolete and should not
  35. ;    be used. Always use NGetTrapAddress and NSetTrapAddress instead.
  36. ;    The old routines will not be supported for PowerPC apps.
  37. ;
  38.  
  39.     IF TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  40. ;
  41. ; pascal UniversalProcPtr GetTrapAddress(UInt16 trapNum)
  42. ;
  43.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  44.         ; parameters:
  45.         ;    trapNum         => D0
  46.         ; returns:
  47.         ;    UniversalProcPtr <= A0
  48.         _GetTrapAddress:    OPWORD    $A146
  49.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  50.         IMPORT_CFM_FUNCTION GetTrapAddress
  51.     ENDIF
  52.  
  53. ;
  54. ; pascal void SetTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum)
  55. ;
  56.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  57.         ; parameters:
  58.         ;    trapAddr        => A0
  59.         ;    trapNum         => D0
  60.         _SetTrapAddress:    OPWORD    $A047
  61.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  62.         IMPORT_CFM_FUNCTION SetTrapAddress
  63.     ENDIF
  64.  
  65.     ENDIF
  66. ;
  67. ; pascal UniversalProcPtr GetOSTrapAddress(UInt16 trapNum)
  68. ;
  69.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  70.         ; parameters:
  71.         ;    trapNum         => D0
  72.         ; returns:
  73.         ;    UniversalProcPtr <= A0
  74.         _GetOSTrapAddress:    OPWORD    $A346
  75.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  76.         IMPORT_CFM_FUNCTION GetOSTrapAddress
  77.     ENDIF
  78.  
  79. ;
  80. ; pascal void SetOSTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum)
  81. ;
  82.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  83.         ; parameters:
  84.         ;    trapAddr        => A0
  85.         ;    trapNum         => D0
  86.         _SetOSTrapAddress:    OPWORD    $A247
  87.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  88.         IMPORT_CFM_FUNCTION SetOSTrapAddress
  89.     ENDIF
  90.  
  91. ;
  92. ; pascal UniversalProcPtr GetToolTrapAddress(UInt16 trapNum)
  93. ;
  94.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  95.         ; parameters:
  96.         ;    trapNum         => D0
  97.         ; returns:
  98.         ;    UniversalProcPtr <= A0
  99.         _GetToolTrapAddress:    OPWORD    $A746
  100.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  101.         IMPORT_CFM_FUNCTION GetToolTrapAddress
  102.     ENDIF
  103.  
  104. ;
  105. ; pascal void SetToolTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum)
  106. ;
  107.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  108.         ; parameters:
  109.         ;    trapAddr        => A0
  110.         ;    trapNum         => D0
  111.         _SetToolTrapAddress:    OPWORD    $A647
  112.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  113.         IMPORT_CFM_FUNCTION SetToolTrapAddress
  114.     ENDIF
  115.  
  116. ;
  117. ; pascal UniversalProcPtr GetToolboxTrapAddress(UInt16 trapNum)
  118. ;
  119.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  120.         ; parameters:
  121.         ;    trapNum         => D0
  122.         ; returns:
  123.         ;    UniversalProcPtr <= A0
  124.         _GetToolboxTrapAddress:    OPWORD    $A746
  125.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  126.         IMPORT_CFM_FUNCTION GetToolboxTrapAddress
  127.     ENDIF
  128.  
  129. ;
  130. ; pascal void SetToolboxTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum)
  131. ;
  132.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  133.         ; parameters:
  134.         ;    trapAddr        => A0
  135.         ;    trapNum         => D0
  136.         _SetToolboxTrapAddress:    OPWORD    $A647
  137.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  138.         IMPORT_CFM_FUNCTION SetToolboxTrapAddress
  139.     ENDIF
  140.  
  141.     IF TARGET_CPU_PPC THEN
  142. ;
  143. ; pascal UniversalProcHandle GetTrapVector(UInt16 trapNumber)
  144. ;
  145.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  146.         IMPORT_CFM_FUNCTION GetTrapVector
  147.     ENDIF
  148.  
  149.     ENDIF    ; TARGET_CPU_PPC
  150.     ENDIF    ; TARGET_OS_MAC
  151.     ENDIF ; __PATCHES__ 
  152.  
  153.